package com.bbva.itradecomex.converter;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.ConverterException;
import javax.faces.convert.FacesConverter;

import com.bbva.itradecomex.domain.ClaseFIA;

@FacesConverter(value="claseFIAConverter")
public class ClaseFIAConverter extends SelectItemsBaseConverter{

	@Override
	public String getAsString(FacesContext arg0, UIComponent arg1, Object value)
			throws ConverterException {
		if (value == null || !(value instanceof ClaseFIA)) {
			return null;
		}
		return ((ClaseFIA) value).getCodigoDescripcion();
	}
}
